clear all; clc; close all;

q = 10^(40/10);
T = 1e-3;
fi=10e-6;
fd=50e6;
Td=1/fd;
Tpn=1e-3/5110;
PNSize=fix(T/Tpn);
PN=sign(randn(1, PNSize));
Nd=fix(T/Td);
PSP=PN(1+mod(fix(0:Nd-1)*Td/Tpn),PNSize);
plot (PSP);